package model

import (
	"auth-server/basic/config"
	"gorm.io/gorm"
)

type Auth struct {
	gorm.Model
	Username string `gorm:"type:varchar(20);not null;comment:'用户名'"`
	Password string `gorm:"type:varchar(32);not null;comment:'密码'"`
	Mobile   string `gorm:"type:char(11);not null;comment:'手机号'"`
}

func (a *Auth) FindUserBy() error {
	return config.DB.Debug().Limit(1).Find(&a).Error
}
